package cn.aiyuan.entity.dictionary;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 字典表 (Dictionary)实体类
 *
 * @since 2020-09-18 13:50:21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "DictionaryDO", description = "字典表")
@TableName("dictionary")
public class Dictionary implements Serializable {

	private static final long serialVersionUID = 380486625022128777L;

	@ApiModelProperty(name = "id", value = "表唯一标识")
	@JsonProperty("id")
	private Long id;

	@ApiModelProperty(name = "pId", value = "父id")
	@JsonProperty("pId")
	private Long parentId;

	@ApiModelProperty(name = "pCode", value = "字典码")
	@JsonProperty("pCode")
	private String code;

	@ApiModelProperty(name = "pName", value = "字典名称")
	@JsonProperty("pName")
	private String name;

	@ApiModelProperty(name = "sCode", value = "字典项编码")
	@JsonProperty("sCode")
	private String subCode;

	@ApiModelProperty(name = "sName", value = "字典项名称")
	@JsonProperty("sName")
	private String subName;

	@ApiModelProperty(name = "other1", value = "附加字段1")
	@JsonProperty("other1")
	private String attach1;

	@ApiModelProperty(name = "other2", value = "附加字段2")
	@JsonProperty("other2")
	private String attach2;

	@ApiModelProperty(name = "explanation", value = "备注")
	@JsonProperty("explanation")
	private String remark;

	@ApiModelProperty(value = "是否删除  0:未删除 1:已删除", hidden = true)
	@JsonIgnore
	private Boolean deleted;

	@ApiModelProperty(name = "crTime", value = "创建时间", hidden = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JsonProperty(value = "crTime")
	private Timestamp createTime;

	@ApiModelProperty(name = "crId", value = "创建人", hidden = true)
	@JsonProperty(value = "crId")
	private Long createId = 1L;

	@ApiModelProperty(name = "upTime", value = "修改时间", hidden = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JsonProperty(value = "upTime")
	private Timestamp updateTime;

	@ApiModelProperty(name = "upId", value = "修改人", hidden = true)
	@JsonProperty(value = "upId")
	private Long updateId;

}
